package cn.source.web.controller.system;

import cn.source.common.core.controller.BaseController;
import cn.source.common.core.domain.AjaxResult;
import cn.source.common.utils.StringUtils;
import cn.source.framework.web.service.SysRegisterService;
import cn.source.system.domain.SysCompany;
import cn.source.system.service.ISysConfigService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * 注册验证
 *
 * @author ruoyi
 */
@RestController
public class SysRegisterController extends BaseController {
    @Autowired private SysRegisterService registerService;

    @Autowired private ISysConfigService configService;

    @PostMapping("/register")
    public AjaxResult register(@RequestBody SysCompany sysCompany) {
        String msg = registerService.register(sysCompany);
        return StringUtils.isEmpty(msg) ? success() : error(msg);
    }
}
